<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>

<body>
<script>

var r = /\b\w/gi;
var s = "javascript JAVA";
var a = s.match(r); 					// 直接调用正则表达式直接量
alert(a); 								// 返回数组["j", "J"]


</script>
</body>
</html>
